<?php

/**
 * Desc
 * @description Holp You Do Good But Not Evil
 * @copyright   Copyright 2014-2015 <ycchen@iwshop.cn>
 * @license     LGPL (http://www.gnu.org/licenses/lgpl.html)
 * @author      Chenyong Cai <ycchen@iwshop.cn>
 * @package     Wshop
 * @link        http://www.iwshop.cn
 */
class Statistics extends Model {


   
	public function queryTotalMoneyByDate($QueryDay){
	
	 return  (float) $this->Db->getOne("SELECT SUM(order_amount) AS `sc` FROM `orders` WHERE DATE_FORMAT(`order_time`,'%Y-%m-%d') = '$QueryDay' AND `wepay_serial` <> '';");
	}
	
	public function queryFactTotalMoneyByDate($QueryDay){
		 return  (float) $this->Db->getOne("SELECT SUM(pay_amount) AS `sc` FROM `orders` WHERE DATE_FORMAT(`order_time`,'%Y-%m-%d') = '$QueryDay' AND `wepay_serial` <> '';");
	
	}
    
    
}
